package com.sskj.jgxt.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import com.sskj.core.query.annotation.DynamicQuery;
import com.sskj.core.repository.GenericRepository;
import com.sskj.jgxt.eng.domain.entity.DingJianDuEng;
import com.sskj.jgxt.param.EngQueryParam;




public interface JianDuEngRepository extends GenericRepository<DingJianDuEng, String> {

	

	@Query("from  DingJianDuEng  x  where x.engName = ?1")
	public DingJianDuEng findByName(String engname);
	
	@Query(value = "from DingJianDuEng x where x.id=?1")
	DingJianDuEng findOneById(String spId);
	
	@Query("from  DingJianDuEng  x  where x.oid = ?1")
	public DingJianDuEng findByOId(String oid);	
	
	@Query("from DingJianDuEng x where x.id <>'' and x.oid = ?1")
	public List<DingJianDuEng> findLsByOId(String oid);	 	
	 

	@Query("update DingJianDuEng set oid=?1  where id = ?2")
	public void updateOIdById(String oid, String id);


	@DynamicQuery
	Page<DingJianDuEng> findEmpPage(EngQueryParam queryParam, Pageable pageable);

}
